- indicator = Nomen::Indicator.find(f.object.indicator_name)
.nested-fields
  = link_to_remove_nested_association(:item, f)
  = f.hidden_field :indicator_name
  - if indicator.datatype == :measure
    - f.object.measure_value_unit ||= indicator.unit
  = f.input("#{indicator.datatype}_value", wrapper: :append, label: indicator.human_name) do |i|
    - if indicator.datatype == :measure
      = f.number_field("#{indicator.datatype}_value_value", label: indicator.human_name)
      = f.input_field("#{indicator.datatype}_value_unit", label: indicator.human_name, collection: Measure.siblings(indicator.unit).collect{|u| [Nomen::Unit[u].human_name, u]})
    - elsif indicator.datatype == :choice
      = f.input_field("#{indicator.datatype}_value", label: indicator.human_name, collection: indicator.selection(:choices))
    - elsif [:boolean, :string, :decimal].include?(indicator.datatype)
      = f.input_field("#{indicator.datatype}_value", label: indicator.human_name, as: indicator.datatype)
    - else
      = f.input_field("#{indicator.datatype}_value", label: indicator.human_name, as: :string)
